<template>
	<view class="uni_box home">
		<navbar title='申请列表'>
		</navbar>
		<view class="content">
			<view class="shenview" v-for="(item,index) in list" :key="index">
				<view class="shenone">
					<text class="cname">{{item.name}}</text>
				</view>
				<text class="smiao">电话:{{ item.mobile }}</text>
				<text class="smiao">推荐人电话:{{ item.parent_mobile }}</text>
				<text class="smiao">团队情况:{{ item.team_des }}</text>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				list: [],
				page: 1,
				limit: 10,
				last_page: 1,
				status: "loadmore",
			}
		},
		onLoad() {
			this.getList()
		},
		onShow() {
		},
		methods: {
			async getList(){//列表数据
				let res = await this.$u.api.getApplySiteList({
					page:this.page,
				});
			this.last_page = res.lastpage;
			let list = res.list;
			this.list = this.page == 1 ? list : [...this.list, ...list];	
			if(this.page >= this.last_page){
				this.status = 'nomore';
			}
				
			},
			loadmore() {
				let page = this.page;
				if (this.status == 'loadmore') {
					this.page++;
					this.getList();
				}
			},
		}
	}
</script>

<style lang="scss" scoped>
	page{
		background-color: #fff;
	}
	.content{
		min-height: 100vh;
		background-color: #f5f5f5;
		padding: 30rpx;
		.shenview{
			background: #FFFFFF;
			border-radius: 20rpx;
			padding: 10rpx 20rpx 40rpx;
			margin-bottom: 20rpx;
			.shenone{
				border-bottom: 1rpx solid #eee;
				display: flex;
				flex-direction: row;
				align-items: center;
				padding: 20rpx 0;
				.cname{
					font-family: PingFang SC;
					font-weight: bold;
					font-size: 32rpx;
					color: #111111;
				}
			}
			.smiao{
				display: block;
				font-family: PingFang SC;
				font-weight: 400;
				font-size: 28rpx;
				color: #333;
				margin-top: 20rpx;
			}
		}
	}
	
</style>
